<template>
    <div>
        <!-- 支付成功图片 -->
        <div class="image">
            <img src="../assets/dui.png" alt="" />
            <div>支付成功</div>
        </div>
        <!-- 收款方、收款金额 -->
        <div class="payItem">
            <div class="payee">{{ route.query.scenic_name }}</div>
            <div class="price">￥{{ route.query.total_price }}</div>
        </div>
        <!-- 完成按钮 -->
        <div class="end">
            <div class="complete" @click="complete">完成</div>
        </div>
        <!-- 查看订单 -->
        <div class="detail">查看订单详情</div>
    </div>
</template>

<script setup>
import { useRouter, useRoute } from "vue-router";
const router = useRouter();
const route = useRoute();
console.log(route.query);
// 跳转售票专区
const complete = () => {
    router.push({
        path: "/ticket",
    });
};
</script>

<style scoped>
/* 成功图片 */
.image {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 200px;
}

.image img {
    width: 50px;
    height: 45px;
    margin-bottom: 5px;
}

.image div {
    color: #09bb07;
    font-size: 14px;
}

/* 收款方 */
.payItem {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.payee {
    font-size: 15px;
    color: #505050;
}

/* 价格 */
.price {
    font-size: 30px;
    color: #383838;
}

/* 完成按钮 */
.end {
    width: 100%;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8%;
}

.complete {
    width: 180px;
    line-height: 30px;
    border: 1px solid #09bb07;
    color: #09bb07;
    font-size: 14px;
    border-radius: 5px;
    text-align: center;
}

/* 订单详情 */
.detail {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #505050;
    margin-top: 8%;
}
</style>